using System;

namespace Framework.Network
{
    public class NetUserToken
    {
        public byte[] Buffer { get; set; }
        public int Index { get; set; }
        public int Length { get; set; }
        public int BytesTransferred { get; set; }
        public ReadMode Mode { get; set; }
        public Action<int, Exception> Handler { get; set; }

        public void Clear()
        {
            Buffer = null;
            Index = 0;
            Length = 0;
            BytesTransferred = 0;
            Mode = ReadMode.Unknown;
            Handler = null;
        }
    }
}